﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing.plaf.basic.border {
    import flash.display.*;
    import flash.geom.*;
    import org.aswing.*;
    import org.aswing.geom.*;
    import org.aswing.plaf.*;
    import org.aswing.graphics.*;

    public class TableHeaderCellBorder implements Border, UIResource {

        protected var shape:Shape;

        public function TableHeaderCellBorder(){
            this.shape = new Shape();
        }
        public function updateBorder(_arg1:Component, _arg2:Graphics2D, _arg3:IntRectangle):void{
            var _local4:ASColor;
            var _local5:ASColor;
            var _local6:ASColor;
            var _local7:int;
            var _local8:Matrix;
            _arg3 = _arg3.clone();
            _arg3.height = (_arg3.height - 4);
            _arg3.y = (_arg3.y + 2);
            if ((_arg1 is AbstractButton)){
                trace("header AbstractButton");
            };
            if (_arg3.height > 0){
                _local4 = _arg1.getBackground();
                _local5 = _local4.offsetHLS(0, -0.2, 0);
                _local6 = _local4.offsetHLS(0, 0.06, 0);
                this.shape.graphics.clear();
                _arg2 = new Graphics2D(this.shape.graphics);
                _local7 = _arg3.height;
                _local8 = new Matrix();
                _local8.createGradientBox(_arg3.width, _arg3.height, (Math.PI / 2), _arg3.x, _arg3.y);
                _arg2.fillRectangle(new GradientBrush(GradientBrush.LINEAR, [_local5.getRGB(), _local5.getRGB(), _local5.getRGB()], [0, 1, 0], [0, 122, 0xFF], _local8), ((_arg3.x + _arg3.width) - 2), _arg3.y, 1, _arg3.height);
                _arg2.fillRectangle(new GradientBrush(GradientBrush.LINEAR, [_local6.getRGB(), _local6.getRGB(), _local6.getRGB()], [0, 1, 0], [0, 122, 0xFF], _local8), ((_arg3.x + _arg3.width) - 1), _arg3.y, 1, _arg3.height);
            };
        }
        public function getBorderInsets(_arg1:Component, _arg2:IntRectangle):Insets{
            return (new Insets(0, 0, 1, 1));
        }
        public function getDisplay(_arg1:Component):DisplayObject{
            return (this.shape);
        }

    }
}//package org.aswing.plaf.basic.border 
